<?
require 'global.php';

$gee=$city;
$str='<option value="0">---'.WEB_NO_SUCH_DATA.'---</option>';

$cate='city'; if(isset($_GET["cate"]))if(($_GET["cate"])!='')$cate=$_GET["cate"];
$id=0; if(isset($_GET["id"]))if(($_GET["id"])!='')$id=$_GET["id"];
//echo $cate.$id;
if($id==0){
	echo $str; exit;
}
switch($cate){
	case 'province':
		{
			$str='0';
			$tem=$province->get_rows(1024,'country_id',$id,'name_en','asc');
			foreach($tem as $val) $str.='<option value="'.$val['id'].'">'.$val['name_'.$lang].'</option>';
		}
	break;
	case 'city':
		{
			$str='0';
			$tem=$city->get_rows(1024,'province_id',$id,'seq_no');
			foreach($tem as $val) $str.='<option value="'.$val['id'].'">'.$val['name_'.$lang].'</option>';
		}
	break;
	case 'county':
		{
			$str='0';
			$tem=$county->get_rows(1024,'city_id',$id,'seq_no');
			foreach($tem as $val) $str.='<option value="'.$val['id'].'">'.$val['name_'.$lang].'</option>';
		}
	break;

}

echo $str;

// end of file